import request from "../utils/request";

const api_name = '/member'

export default {
    // 发送手机验证码
    sendSMS(mobile) {
        return request({
            url: `${api_name}/sendsms/${mobile}`,
            method: 'get'
        })
    },
    // 注册接口
    register(user) {
        return request({
            url: `${api_name}/register`,
            method: 'post',
            data: user
        })
    },
    // 登录接口
    login(user) {
        return request({
            url: `${api_name}/login`,
            method: 'post',
            data: user
        })
    },
    // 获取登录用户的信息
    getInfo() {
        return request({
            url: `${api_name}/getinfo`,
            method: 'get'
        })
    }
}